{anchor:msg_update_0}
!! Update message
Update message
!!! Constructor
!!!! new COSA.Request.Update(entity, requestId)
|| Param || Type || Description ||
| entity | [COSA.BusinessEntity|COSA Namespace#lib_businessentity_0] | Entity to update |
| requestId _(optional)_ | {{string}} | Request unique identifier (GUID) |
!!! Instance Properties
|| Name || Type || Description ||
| entity | [COSA.BusinessEntity|COSA Namespace#lib_businessentity_0] | Entity |
!!! Example
{code:javascript}
var contact_1 = new COSA.BusinessEntity('contact', 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
contact_1.attributes.creditlimit = new COSA.XrmMoney(500.14);
contact_1.attributes.numberofchildren = new COSA.XrmWholeNumber(3);
contact_1.attributes.creditonhold = new COSA.XrmBoolean(false);
contact_1.attributes.gendercode = new COSA.OptionSetValue(2);
contact_1.attributes.birthdate = new COSA.XrmDateTime(new Date());
contact_1.attributes.address1_latitude = new COSA.XrmDouble(15.55);

var updateRequest_0 = new COSA.Request.Update(contact_1);
//message execution
updateRequest_0.execute(function ( r ) {
	//working with a response
});
//or
COSA.Core.Execute(updateRequest_0, function ( r ) {
	//working with a response
});
{code:javascript}

[Back to Top|#tbl_contents_0]